<extend name="Public:index" />
<block name="main-crumb">
    <li class="active">修改密码</li>
</block>
<block name="mycss">
    <style type="">
        .tableleft{
        text-align: left;
    }
    </style>
</block>
<block name="main-content">
    <iframe name="ajaxifr" style="display:none;"></iframe>
    <div class="container-fluid">
        <div class="row">
            <div class="col-12">
                <div class="card">
                    <div class="card-body">
                        <!--后台右侧 start-->
                        <div id="admin_right">
                            <div id="inner">
                                <div>
                                    <form id="frm"  action="__ACTION__" method="post" target="ajaxifr">
                                        <table class="table table-bordered table-hover">
                                            <tr>
                                                <td width="10%">用户名：&nbsp;&nbsp;</td>
                                                <td><label>{$name}</label></td>
                                            </tr>
                                            <tr>
                                                <td>密码：</td>
                                                <td><input type="password" name="password" id="pwd" />
                                                    &nbsp;&nbsp;
                                                    <span><b style="color:#CE0000;">*</b>&nbsp;&nbsp;(6-16个大小写字母或数字)</span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>确认密码：</td>
                                                <td><input type="password" name="repassword" id="repwd"/>
                                                    &nbsp;&nbsp;<span><b style="color:#CE0000;">*</b>&nbsp;&nbsp;(请重复输入密码)</span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="3">
                                                    <button type="button" class="btn btn-primary" onclick="chkfrm()">保存</button>
                                                </td>
                                            </tr>

                                        </table>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</block>
<block name="myscript">
<script>
    function chkfrm(){
       var pwd = $.trim($('#pwd').val());
       var repwd = $.trim($('#repwd').val());
       if(pwd.length == 0){
           notify('info', '提示', '密码不能为空！');
           return;
       }
       if(repwd != pwd){
           notify('info', '提示', '确认密码与密码不相同！');
           return;
       }
       $('#frm').submit();
    }
</script>
</block>